<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<th:block th:fragment="layui">
  <link rel="stylesheet" th:href="@{/fly/layui/css/layui.css}"/>
  <script th:src="@{/fly/layui/layui.js}"></script>
  <script th:inline="javascript">
    var prefixUrl = [[${#httpServletRequest.getContextPath()}]];

    function mergeRow($, field) {
      var row = $('td[data-field=' + field + ']');
      var sum = 1;
      var first = 0;
      row.each(function (index, elem) {
        if (index == row.length - 1) {
          $(row[first]).attr('rowspan', sum);
          return;
        }
        var next = row[index + 1];
        if ($(this).children().html() == $(next).children().html()) {
          sum++;
          $(next).hide();
        } else {
          $(row[first]).attr('rowspan', sum);
          sum = 1;
          first = index + 1;
        }
      });
    }
  </script>
</th:block>
</html>